package cn.tramy.pinxian.common.exception

/**
 * Created by yanjunhua on 16/5/30.
 */
interface CommonErrorCodes {
    companion object {
        const val COMMON_PARAMETER_ERROR = "COMMON_PARA_ERR"
        const val COMMON_PARAMETER_REQUIRED = "COMMON_PARA_REQUIRED"
        const val COMMON_OPERATION_INVALID = "COMMON_OPER_INVALID"
        const val COMMON_UNKNOWN_EXCEPTION = "COMMON_UNKNOWN_EXCEPTION"
        const val COMMON_COMMON_EXCEPTION = "COMMON_COMMON_EXCEPTION"
        const val COMMON_NPE = "COMMON_NPE"
        const val COMMON_NAME_DUPLICATED = "COMMON_NAME_DUPLICATED"
        const val COMMON_CODE_DUPLICATED = "COMMON_CODE_DUPLICATED"


        const val COMMON_MESSAGE_PARAMETER_ERROR = "参数错误"
        const val COMMON_MESSAGE_OPERATION_INVALID = "无效操作"
        const val COMMON_MESSAGE_UNKNOWN_EXCEPTION = "未知异常"
        const val COMMON_MESSAGE_NPE = "空指针异常"
        const val COMMON_MESSAGE_NAME_DUPLICATED = "名称重复"
        const val COMMON_MESSAGE_CODE_DUPLICATED = "编码重复"

        const val COMMON_MESSAGE_TEMPLATE_PARAMETER_REQUIRED = "参数[%s]不能为空"

        const val COMMON_MESSAGE_TEMPLATE_NAME_DUPLICATED = "名称[%s]重复"
        const val COMMON_MESSAGE_TEMPLATE_CODE_DUPLICATED = "编码[%s]重复"
    }

}
